<template>
  <n-config-provider :theme="theme">
    <n-message-provider>
      <n-notification-provider>
        <n-loading-bar-provider>
          <n-dialog-provider>
            <Layout />
          </n-dialog-provider>
        </n-loading-bar-provider>
      </n-notification-provider>
    </n-message-provider>
  </n-config-provider>
</template>

<script setup>
import { darkTheme } from 'naive-ui'
import Layout from './components/Layout.vue'
import { ref } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()
const isLoggedIn = ref(false)

const handleLogout = () => {
  isLoggedIn.value = false
  router.push('/')
}

const theme = null // 使用浅色主题，如果需要深色主题，设置为 darkTheme
</script>

<style>
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

#app {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: #18a058;
}

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.content {
  margin-top: 60px;
  min-height: calc(100vh - 120px);
  background: #f5f5f5;
}

.footer {
  background: #fff;
  padding: 20px 0;
}

.footer-content {
  text-align: center;
  color: #666;
}
</style>
